package com.sinodata.atmc.business
{
	import com.sinodata.atmc.bean.ScannerParamBean;
	
	import flash.external.ExternalInterface;

	public class CReaderOCX implements ICReaderOCX
	{
		
		public function CReaderOCX()
		{
		}
		
		public function closeRetractDoc(spb:ScannerParamBean):String
		{
			
			return null;
		}
		
		public function closeShutter(spb:ScannerParamBean):String
		{
			// TODO Auto Generated method stub
			return null;
		}
		
		public function scannerInit(spb:ScannerParamBean):String
		{
			var result:String = ExternalInterface.call(spb.callJsName);
			return result;
		}
		
		
		public function disposeDoc(spb:ScannerParamBean):String
		{
			// TODO Auto Generated method stub
			return null;
		}
		
		public function getScanInfo(spb:ScannerParamBean):String
		{
			// TODO Auto Generated method stub
			return null;
		}
		
		public function scanner():String
		{
			// TODO Auto Generated method stub
			return null;
		}
		
		public function waitPutDoc(spb:ScannerParamBean,resultFun:Function):String
		{
			ExternalInterface.addCallback("",resultFun);
			return null;
		}
		
		public function openShutter(spb:ScannerParamBean,resultFun:Function):String
		{
			//js事件的回调方法
			ExternalInterface.addCallback(spb.callbackName,resultFun);
			//调用JS的方法
			var result:String = ExternalInterface.call(spb.callJsName,spb.timeout*1000);
			return result;
		}
		
	}
}